package com.augurit.gzcgwsp.smartformCsdlwj.service.impl;

import java.text.ParseException;
import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springside.modules.orm.Page;
import org.springside.modules.orm.PropertyFilter;

import com.augurit.gzcgwsp.commonex.util.lang.DateUtilsEX;
import com.augurit.gzcgwsp.printDoc.entity.YwPrintDoc;
import com.augurit.gzcgwsp.rqqyjyxk.web.form.YwRqQyjyxkForm;
import com.augurit.gzcgwsp.sendNotice.entity.YwSphjInfo;
import com.augurit.gzcgwsp.smartformCsdlwj.dao.ShljysQtqkDao;
import com.augurit.gzcgwsp.smartformCsdlwj.entity.ShljysQtqk;
import com.augurit.gzcgwsp.smartformCsdlwj.entity.YwHwShljqs;
import com.augurit.gzcgwsp.smartformCsdlwj.service.IShljqsQtqkService;
import com.augurit.gzcgwsp.smartformCsdlwj.web.form.ShljqsForm;
import com.augurit.gzcgwsp.ywcmn.service.IYwComPrintService;
import com.augurit.wf.common.service.impl.WfBusClientServiceImpl;

/**
 * <P>title:生活垃圾清扫serivce实现类</p>																								
 * <P>Description：</p>
 * <p>Copyright: Copyright (c) 2011 augurit</p>
 * <p>Company: 广州奥格智能科技</p>
 * History：
 * @author:zhangjun
 * @date Nov 15, 2011
 * @version 1.0
 */
@Service
@Transactional
public class ShljqsQtqkServiceImpl   implements IShljqsQtqkService{
    @Autowired
    private ShljysQtqkDao shljysQtqkDao;
    @Autowired
    private IYwComPrintService ywComPrintService;
    
    

    public void delete(Long... ids) {
        // TODO Auto-generated method stub
        
    }

    public void save(ShljysQtqk shljysQtqk) {
        // TODO Auto-generated method stub
    	shljysQtqkDao.getSession().saveOrUpdate(shljysQtqk);
        
    }

    public ShljysQtqk get(Long ywid){
    	String sql = "from ShljysQtqk s where s.ywid='" + ywid + "' order by s.id desc";
    	List<ShljysQtqk> entityList = shljysQtqkDao.find(sql);
    	if(entityList!=null && entityList.size()>0){
    		return entityList.get(0);
    	}else{
    		return null;
    	}
    	
    }
    
}

